package org.ali.structuralpattern.facadepattern;

import org.ali.structuralpattern.facadepattern.color.Color;
import org.ali.structuralpattern.facadepattern.color.Red;
import org.ali.structuralpattern.facadepattern.shape.Circular;
import org.ali.structuralpattern.facadepattern.shape.Shape;

/**
 * 外观类
 */
public class DrawFacade {
    private final Shape shape;
    private final Color color;

    public DrawFacade() {
        shape = new Circular();
        color = new Red();
    }

    /**
     * 画红色圆形
     */
    public void drawCircularRed() {
        shape.draw();
        color.paint();
    }
}
